<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link rel="stylesheet" href="layui-v2.7.6/layui/css/layui.css">
    <script src="./layui-v2.7.6/layui/layui.js"></script>

</head>

<body>
    <input type="button"  value="打开弹出层" class="layui-btn layui-btn-normal" onclick="doOpen()">

    <script>

        function doOpen() {
            //使用弹出层模块
            layui.use('layer', function () {
                var layer = layui.layer;
                layer.open({
                    title:"用户信息",
                    type: 1,
                    content: '<i class="layui-icon layui-icon-heart-fill"></i>'+
                             '<i class="layui-icon layui-icon-heart-fill"></i>'+
                             '<i class="layui-icon layui-icon-heart-fill"></i>', //这里content是一个普通的String
                    area: ['500px', '500px'],
                    btn: ['取消', '保存']
                    , yes: function (index, layero) {
                        //按钮【按钮一】的回调
                        console.log(11);
                    }
                    , btn2: function (index, layero) {
                        //按钮【按钮二】的回调

                        //return false 开启该代码可禁止点击该按钮关闭
                    }
                    , cancel: function () {
                        //右上角关闭回调

                        //return false 开启该代码可禁止点击该按钮关闭
                    }
                });
            });
        }



    </script>
</body>

</html>